package org.fyv233.missingno_craft.datagen;

import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider;
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.BlockTags;
import org.fyv233.missingno_craft.block.ModBlocks;

import java.util.concurrent.CompletableFuture;

public class ModBlockTagsProvider extends FabricTagProvider.BlockTagProvider {
    public ModBlockTagsProvider(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
        super(output, registriesFuture);
    }

    @Override
    protected void configure(RegistryWrapper.WrapperLookup wrapperLookup) {
        getOrCreateTagBuilder(BlockTags.PICKAXE_MINEABLE)
                .add(ModBlocks.MISSINGNO_BLOCK)
                .add(ModBlocks.MISSINGNO_ORE)
                .add(ModBlocks.MISSINGNO_FENCE)
                .add(ModBlocks.MISSINGNO_STAIRS)
                .add(ModBlocks.MISSINGNO_BUTTON)
                .add(ModBlocks.MISSINGNO_FENCE_GATE);

        getOrCreateTagBuilder(BlockTags.NEEDS_DIAMOND_TOOL)
                .add(ModBlocks.MISSINGNO_BLOCK)
                .add(ModBlocks.MISSINGNO_ORE)
                .add(ModBlocks.MISSINGNO_FENCE)
                .add(ModBlocks.MISSINGNO_STAIRS)
                .add(ModBlocks.MISSINGNO_BUTTON)
                .add(ModBlocks.MISSINGNO_FENCE_GATE);

        getOrCreateTagBuilder(BlockTags.FENCES)
                .add(ModBlocks.MISSINGNO_FENCE);

        getOrCreateTagBuilder(BlockTags.FENCE_GATES)
                .add(ModBlocks.MISSINGNO_FENCE_GATE);

        getOrCreateTagBuilder(BlockTags.WOODEN_BUTTONS)
                .add(ModBlocks.MISSINGNO_BUTTON);


    }
}
